import { GEtHOMEDAT,GEtGOODDAT } from "./contains";
const defaultState={
hotcate:[],
goodArr:[],
show:true
}
const reducer =(state=defaultState,action)=>{
  switch(action.type){
    case GEtHOMEDAT:{
      return {...state,hotcate:action.arr} //不可变值
    };
    case GEtGOODDAT:{
      return {...state,goodArr:action.arr} //不可变值
    };
    default:return state
  }
}
export{
  reducer
}